using System;
using System.Collections.Generic;
using System.Text;

namespace TcKs.MSOffice.WrapperAssembliesCodeGenerator {
	/// <summary>
	/// Interface for event arguments class providing resolution of value.
	/// </summary>
	public interface IResolutionEventArgs {
		/// <summary>
		/// Source (original) value.
		/// </summary>
		object Source { get;}
		/// <summary>
		/// Result (final) value.
		/// </summary>
		object Result { get;set;}
	}

	public class ResolutionEventArgs<T_SOURCE, T_RESULT> : EventArgs, IResolutionEventArgs {
		private T_SOURCE source;
		/// <summary>
		/// Source (original) value.
		/// </summary>
		public T_SOURCE Source {
			get { return this.source; }
			private set { this.source = value; }
		}

		private T_RESULT result;
		/// <summary>
		/// Result (final) value.
		/// </summary>
		public T_RESULT Result {
			get { return this.result; }
			set { this.result = value; }
		}

		public ResolutionEventArgs( T_SOURCE source ) {
			this.Source = source;
		}
		public ResolutionEventArgs( T_SOURCE source, T_RESULT result ) : this( source ) {
			this.Result = result;
		}

		#region IResolutionEventArgs Members

		object IResolutionEventArgs.Source {
			get { return this.Source; }
		}

		object IResolutionEventArgs.Result {
			get { return this.Result; }
			set { this.Result = (T_RESULT)value; }
		}

		#endregion
	}
}
